<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd">
<HTML
><HEAD
><TITLE
>Objects</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
REL="HOME"
TITLE="LIBIT Documentation"
HREF="index.html"><LINK
REL="UP"
TITLE="Programming with libit"
HREF="programming.html"><LINK
REL="PREVIOUS"
TITLE="2D Transforms"
HREF="transform2d.html"><LINK
REL="NEXT"
TITLE="Casting"
HREF="casting.html"></HEAD
><BODY
CLASS="APPENDIX"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>LIBIT Documentation</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="transform2d.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="casting.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="APPENDIX"
><H1
><A
NAME="OBJECTS"
></A
>Appendix A. Objects</H1
><P
>    For high level components, an object oriented approach was taken to
    allow for a greater flexibility through the inheritance and polymorphism
    concepts. This appendix gives some details on the usage and implementation
    of objects for advanced users.
  </P
><DIV
CLASS="SECTION"
><H1
CLASS="SECTION"
><A
NAME="DECLARATION"
>A.1. Declaration, construction and destruction</A
></H1
><P
>  All object types are of the form it_objectname_t. All objects are deleted using the expression it_delete(x) where x is an object.
  </P
><PRE
CLASS="PROGRAMLISTING"
>/* declare a scalar quantizer object */
it_scalar_quantizer_t *scalar_quantizer; 

/* create and initialize a new scalar quantizer centered on 0 with step 1 */
scalar_quantizer = it_scalar_quantizer_new_from_center(0, 1);

/* delete the scalar_quantizer object */
it_delete(scalar_quantizer, v);</PRE
></DIV
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="transform2d.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="casting.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>2D Transforms</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="programming.html"
ACCESSKEY="U"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Casting</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>